//
//  DQRightCell.m
//  DQBaisibudejie
//
//  Created by 杜倩 on 16/9/6.
//  Copyright © 2016年 杜倩. All rights reserved.
//

#import "DQRightCell.h"
#import "UIImageView+WebCache.h"
#import "DQRightModel.h"
@implementation DQRightCell


- (void)awakeFromNib {

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}
#pragma mark 重写模型的set方法--赋值
-(void)setModel:(DQRightModel *)model{
    _model=model;
    NSURL *url=[NSURL URLWithString:model.header];
    [_headerView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"header_cry_icon"]];//placeholderImage--占位图
    //设置图片为圆形--这步也可以写在awakeFromNib里面
    _headerView.layer.cornerRadius = 25;
    _headerView.layer.masksToBounds = YES;
    
    _name.text=model.screen_name;
    _fans.text=[NSString stringWithFormat:@"%@个人关注",model.fans_count ];//拼接--前为字符串，后为nsnumber
    [self sizeToFit];//自动适应大小
    
}

@end
